package com.sino.report;

import com.sino.report.table.*;
import java.util.*;
import org.jfree.chart.*;

public class Report {
	private String pageHeader;
	private String pageFooter;
	private PageInfo pageInfo = new PageInfo();
	private Hashtable cellStyle = new Hashtable();
	private Table reportBody;
	private String name;
	private String defaultStyle = null;
	private org.jfree.chart.JFreeChart chart;

	public Report() {
	}

	public void clear() {
		if (cellStyle != null) {
			cellStyle.clear();
		}
		if (reportBody != null) {
			reportBody.clear();
		}
	}

	public String getPageHeader() {
		return pageHeader;
	}

	public void setPageHeader(String pageHeader) {
		this.pageHeader = pageHeader;
	}

	public String getPageFooter() {
		return pageFooter;
	}

	public void setPageFooter(String pageFooter) {
		this.pageFooter = pageFooter;
	}

	public PageInfo getPageInfo() {
		return pageInfo;
	}

	public void setPageInfo(PageInfo pageInfo) {
		this.pageInfo = pageInfo;
	}

	public Table getReportBody() {
		return reportBody;
	}

	public void setReportBody(Table reportBody) {
		this.reportBody = reportBody;
	}

	public Hashtable getStyle() {
		return cellStyle;
	}

	public CellStyle getCellStyle(String strID) {
		return (CellStyle)this.cellStyle.get(strID);
	}

	public boolean setCellStyle(String strID, CellStyle cellStyle) {
		boolean blReturn = true;
		CellStyle csTmp = (CellStyle)this.cellStyle.get(strID);
		if (csTmp == null) {
			this.cellStyle.put(strID, cellStyle);
		} else {
			blReturn = false;
		}

		return blReturn;
	}

	public void removeCellStyle(String strID) {
		this.cellStyle.remove(strID);
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDefaultStyle() {
		return defaultStyle;
	}

	public void setDefaultStyle(String defaultStyle) {
		this.defaultStyle = defaultStyle;
	}

	public org.jfree.chart.JFreeChart getChart() {
		return chart;
	}

	public void setChart(org.jfree.chart.JFreeChart chart) {
		this.chart = chart;
	}

}
